<?php
include APPPATH . 'views/cms/inc/01_head.php';
include APPPATH . 'views/cms/inc/05_top.php';
?>
<!-- Content container -->
<div class="loginWrapper row-fluid container">
    <div class="widget">
        <div class="navbar">
            <div class="navbar-inner">
                <h6><i class="icon-signin"></i><?php echo $langs[ "login" ] ?></h6>
                
            </div>
        </div>
        <div class="well body">
            <form method="POST" class="form-horizontal" action="nothing"
				target="integration_asynchronous"
			>
            <div class="control-group">
                <div class="input-prepend" style="white-space: nowrap;">
                    <span class="add-on"><i class="icon-user"></i></span>
                    <input class="span12" type="text" placeholder="<?php echo $langs[ "username" ]?>" name="username" />
                </div>
                <div class="input-prepend" style="white-space: nowrap;">
                    <span class="add-on"><i class="icon-signin"></i></span>
                    <input class="span12" type="password" placeholder="<?php echo $langs[ "password" ]?>" name="password" />
                </div>
            </div>
                <button type="submit" name="action" value="login"  class="base_button base_green" onclick="login();"><span class="icon-lock"></span>&nbsp;<?php echo $langs[ "login" ] ?></button>
            
            </form>
        </div>
    </div>
    <script>
    function login() {
        new backend({
            url: "",
            data: {
                username: $('input[name="username"]').val(),
                password: $('input[name="password"]').val(),
				action:'login'
            },
            datatype: "json",
            callback: function(data) {
                if (data.result < 0) {
                    $.jGrowl(data.message,{ sticky: true, theme: 'growl-error', header: 'Error!' });
                } else {
                    $.jGrowl(data.message);
                    window.location.reload();
                }
            }
        }).call();
    }
    </script>
</div>
<div id="container">
    <!-- Content -->
    <div id="content">

        <!-- Content wrapper -->
        <div class="wrapper">
            <!-- Breadcrumbs line -->
            <div class="crumbs">
                <ul id="breadcrumbs" class="breadcrumb"> 
                    <li><a href="/backend">CMS</a></li>
                    <li class="active"><a href="#" title=""><?php echo $langs[ "login" ] ?></a></li>
                </ul>
            </div>
            <!-- /breadcrumbs line -->
        </div>
        <!-- /content wrapper -->

    </div>
    <!-- /content -->
    
    <style>
        body{background: none}
        .loginWrapper {
            width: 320px;
            position: absolute;
            left: 50%;
            top: 50%;
            margin: -160px 0 0 -160px;
            text-align: center;
            -moz-perspective: 800px;
            -webkit-perspective: 800px;
            perspective: 800px;
        }
    </style>
</div>
<!-- /content container -->
<?php include APPPATH . 'views/cms/inc/02_foot.php'; ?>



